#ifndef __SHT20_H
#define __SHT20_H

#include "i2c.h"

#define SHT20_ADDRESS 0x40 // SHT20的I2C地址
#define SHT20_TEMP_CMD 0xe3 // 温度测量命令
#define SHT20_RH_CMD 0xe5 // 湿度测量命令
#define HAL_IIC_DELAY 200

//#define AP3216C_ADDR     0X1E

#define AP3216C_SYSTEMCONG  0x00
#define AP3216C_INTSTATUS   0X01
#define AP3216C_INTCLEAR    0X02
#define AP3216C_IRDATALOW   0x0A
#define AP3216C_IRDATAHIGH  0x0B
#define AP3216C_ALSDATALOW  0x0C
#define AP3216C_ALSDATAHIGH  0X0D
#define AP3216C_PSDATALOW   0X0E
#define AP3216C_PSDATAHIGH  0X0F

#define AP3216C_POWER_DOWN   0x00
#define AP3216C_ENABLE_ALL   0x03
#define AP3216C_SW_RESET     0x04
#define AP3216C_SW_ALS     0x07

int SHT20_Measure(double *temperature, double *humidity);
//void lighttest(double *light_num);

#endif